#!/usr/bin/env bash

dateStr=`date +"%Y-%m-%d-%H-%M"`
backUpPath=/data/mongodb_backup

mkdir ${backUpPath}/${dateStr}
mongodump -o ${backUpPath}/${dateStr} 2>&1| tee ${backUpPath}/${dateStr}/backup.log